<template>
	<view>
		<view class="rich-info">
			<rich-text :nodes="info"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				param: {
					type: 0,
					is_third: '',
					id: '',
					level: '',
					is_finished: '',
					is_fire:''
				},
				info: '',
				title: ['', '投保须知', '客户告知', '特别约定', '责任免除', '中国太平洋财产保险股份有限公司雇主责任保险（2022版）条款',
					'中国太平洋财产保险股份有限公司雇主责任保险（2022版）附加死亡及伤残补助金保险条款', '中国太平洋财产保险股份有限公司雇主责任保险附加法律费用额外增加条款'
				]
			}
		},
		onLoad(e) {
			// this.type = e.type;
			// this.is_three = e.is_three;
			// this.id = e.id;
			// this.level = e.level;
			// this.is_finished = e.is_finished;
			for(let i in this.param){
				this.param[i] = e[i]
			}
			console.log(this.param);
			uni.setNavigationBarTitle({
				title: this.title[this.param.type]
			})
			this.getData();
		},
		methods: {
			getData() {
				this.ajax('index/getTextContent', {
					data: this.param,
					success: (res) => {
						this.info = res.msg;
						console.log(res);
					}
				})
			}
		}
	}
</script>

<style>
	.rich-info {
		padding: 30upx;
		font-size: 28upx;
	}
</style>